import { RouteRecordRaw } from 'vue-router'

// 菜单路由
export const asyncRouters: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/main',
    name: 'main',
    redirect:'/home',
    component: () => import('@/views/layout/index.vue'),
    children:[
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: 'tabbar.home',
          keepAlive: true,
        },
      },
    ]
  },
  {
    path: '/paymentMethods',
    name: 'paymentMethods',
    component: () => import('@/views/home/paymentMethods/index.vue')
  },
  {
    path: '/addAPaymentMethod',
    name: 'addAPaymentMethod',
    component: () => import('@/views/home/paymentMethods/addAPaymentMethod.vue')
  },
  {
    path: '/personalInformation',
    name: 'personalInformation',
    component: () => import('@/views/home/personalInformation/index.vue')
  },
  {
    path: '/securitySettings',
    name: 'securitySettings',
    component: () => import('@/views/home/securitySettings/index.vue')
  },
  {
    path: '/countryOfRegistration',
    name: 'countryOfRegistration',
    component: () => import('@/views/home/countryOfRegistration/index.vue')
  },
  {
    path: '/realNameAuthentication',
    name: 'realNameAuthentication',
    component: () => import('@/views/home/realNameAuthentication/index.vue')
  },
  {
    path: '/changeYourPassword',
    name: 'changeYourPassword',
    component: () => import('@/views/home/changeYourPassword/index.vue')
  },
  {
    path: '/helpCenter',
    name: 'helpCenter',
    component: () => import('@/views/home/helpCenter/index.vue')
  },
  {
    path: '/privacyPolicy',
    name: 'privacyPolicy',
    component: () => import('@/views/home/privacyPolicy/index.vue')
  },
  {
    path: '/aboutUs',
    name: 'aboutUs',
    component: () => import('@/views/home/aboutUs/index.vue')
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('@/views/search/index.vue')
  },
  {
    path: '/notice',
    name: 'notice',
    component: () => import('@/views/notice/index.vue')
  },
  {
    path: '/noticeList',
    name: 'noticeList',
    component: () => import('@/views/notice/noticeList.vue')
  },
  {
    path: '/noticeDetail',
    name: 'noticeDetail',
    component: () => import('@/views/notice/noticeDetail.vue')
  },
  {
    path: '/capitalAccount',
    name: 'capitalAccount',
    component: () => import('@/views/capital-account/index.vue')
  },
  {
    path: '/rechargeMethod',
    name: 'rechargeMethod',
    component: () => import('@/views/capital-account/recharge-method.vue')
  },
  {
    path: '/withdrawalSuccessful',
    name: 'withdrawalSuccessful',
    component: () => import('@/views/capital-account/withdrawal-successful.vue')
  },
  {
    path: '/immediatePayment',
    name: 'ImmediatePayment',
    component: () => import('@/views/capital-account/immediate-payment.vue')
  },
  {
    path: '/depositSuccessful',
    name: 'depositSuccessful',
    component: () => import('@/views/capital-account/deposit-successful.vue')
  },
  {
    path: '/immediateWithdrawal',
    name: 'immediateWithdrawal',
    component: () => import('@/views/capital-account/immediate-withdrawal.vue')
  },
  {
    path: '/moneyDetail',
    name: 'moneyDetail',
    component: () => import('@/views/capital-account/money-detail.vue')
  },
  {
    path: '/singleMoneyDetail',
    name: 'singleMoneyDetail',
    component: () => import('@/views/capital-account/money-record-detail.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('@/views/register/index.vue')
  }
]

// 默认路由
export const defaultRouters: Array<RouteRecordRaw> = [
  {
    path: '/:pathMatch(.*)',
    component: () => import('@/views/page-error/404.vue')
  }
]
